import Vue from 'vue'
import Router from 'vue-router'
import first from '@/pages/first/first'
import community from '@/pages/first/community'
import service from '@/pages/first/service'
import cloud from '@/pages/first/cloud'


import App from '../App'

//echarts

Vue.use(Router)
const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return routerPush.call(this, location).catch(error=> error)
}

export default new Router({
    mode: "hash",
    base: '/dist',
    path: '/',
    component: App,
    routes: [
        { path: '', redirect: '/first' },
        {
            path: '/first',
            name: 'first',
            component: first,
            meta: {
                isKeep: true  // 用来记录当前页面是否要使用keep-alive
              }
        },
        {
            path: '/community',
            name: 'community',
            component: community,
        },
        {
            path: '/service',
            name: 'service',
            component: service,
        },
        {
            path: '/cloud',
            name: 'cloud',
            component: cloud,
        },
       
       

    ],
})